import Vue from 'vue';
import Element from 'element-ui';
import App from '@/App';

// import i18n from '@/i18n'

import i18n from './i18n/i18n';

import router from '@/router';
import store from '@/store';
// 样式
import '@/icons';
import '@/assets/icons/iconfont.css';
import '@/element-ui/theme/index.css';
import '@/assets/scss/aui.scss';
import '@/assets/scss/index.scss';
import * as echarts from 'echarts';
import '@/assets/scss/variables.scss';
import './element-variables.scss';
import enumUtils from './utils/enumUtils';
import { clacTableHeight } from '@/utils/index';
import config from '../public/config';
// import './element-variables.scss'
// 网络请求
import http from '@/utils/request';
// 全局文件
import plugins from '@/components/plugins';
// 暂无数据
// import NoData from '@/components/nodata/nodata'
// 混合
import minxin from '@/mixins/crud';

import Print from 'vue-print-nb';
Vue.use(Print);

import './utils/directive';
Vue.config.productionTip = false;

Vue.mixin(minxin);
Vue.use(plugins);
// Vue.use(NoData)
Vue.use(enumUtils); // 枚举方法 eg:enumUtils.articleType.list

Vue.use(Element, {
  size: 'default',
  i18n: (key, value) => i18n.t(key, value),
});

// 挂载全局
Vue.prototype.$http = http;
Vue.prototype.$echarts = echarts;
Vue.prototype.$clacTableHeight = clacTableHeight;

Vue.prototype.$timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
Vue.prototype.$EventBus = new Vue();

// Vue.prototype.$ip = 'http://www.test.blzdentalcloud.com:90/#/';

// 控制全局的项目版本
Vue.prototype.$config = config;

new Vue({
  components: {
    // NoData
  },
  i18n,
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');

